from typing import Optional

from sqlmodel import Field

from src.base.beans import PageParam
from src.domain.base_model import TenantModel


class SysTenantPackageBase(TenantModel):
    package_id: Optional[int] = Field(primary_key=True, description="套餐序号",
                                      sa_column_kwargs={"comment": "套餐序号"})
    package_name: Optional[str] = Field(description="套餐名称", sa_column_kwargs={"comment": "套餐名称"})


class SysTenantPackage(SysTenantPackageBase, table=True):
    __tablename__ = "sys_tenant_package"
    __table_args__ = {'extend_existing': True, 'comment': '租户套餐表'}


class SysTenantPackageReq(SysTenantPackageBase, PageParam):
    pass


class SysTenantPackageResp(SysTenantPackageBase):
    pass
